package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

const NUM  = 5

func main()  {

	var arr [NUM]int64
	input:=bufio.NewScanner(os.Stdin)
	for i:=0;i<NUM;i++{
		fmt.Printf("请输入第%d个值：", i+1)
		input.Scan()
		res,err:=strconv.ParseInt(input.Text(), 10, 64)
		//错误的话i减一，重新输入
		if err != nil{
			fmt.Println("input ERROR")
			i--
			continue
		}
		arr[i]=res
	}

	max:=maxInt(arr)
	fmt.Printf("max value is:%d", max)
}

func maxInt(arr [NUM] int64) int64  {
	var max int64=0
	for _,value:=range arr{
		//fmt.Println(max, value)
		if(value>max){
			max=value
		}
	}
	return max
}